<?php
class FrmUserInfo{
	private $user;
	private $setter;
	private $dbOperator;
	private $easyForm;
	
	private $div;
	function __construct($user){
		$this->user=new User();
		$this->user=$user;
		$this->setter=new Setter("../../Config");
		$this->dbOperator=new DbOperator();
		$this->dbOperator=new DbOperator($this->setter->getDataBaseHost(),$this->setter->getDataBaseUserName(),$this->setter->getDataBaseName(),$this->setter->getDataBasePassword());
		$this->dbOperator->connect();
		$roles=$this->dbOperator->consult("SELECT nombre FROM roles", "yes");
				
		$this->easyForm=new EasyForm("usersFormInfo", "usersFormInfo","get","../../Events/Admin/EventsFrmUserInfo.php","Información de Usuario:","","","","");
		
		$this->easyForm->addInput(1,"Cedula:","cedulaInfo","cedulaInfo","","yes","","","form","","",array());
		$this->easyForm->setItem("Cedula:",$this->user->getCedula());
		
		$this->easyForm->addInput(1,"Nombre:","nombreInfo","nombreInfo","","yes","","","form","","",array());
		$this->easyForm->setItem("Nombre:",$this->user->getNombre());
		
		$this->easyForm->addInput(1,"Apellido:","apellidoInfo","apellidoInfo","","yes","","","form");
		$this->easyForm->setItem("Apellido:",$this->user->getApellido());
		
		$this->easyForm->addInput(1,"Nick:","nickInfo","nickInfo","","yes","","","form");
		$this->easyForm->setItem("Nick:",$this->user->getNick());
		
		$this->easyForm->addInputPassword(1,"Password:","passwordInfo","passwordInfo","","yes","","","form");
		$this->easyForm->setItem("Password:",$this->user->getPassword());
		
		$this->easyForm->addInput(1,"Rol:","rolInfo","rolInfo","","yes","","","form");
		$this->easyForm->setItem("Rol:",$this->user->getRol());
		
		$this->easyForm->addInput(1, "Telefono:","telefonoInfo","telefonoInfo","","yes","","","form");
		$this->easyForm->setItem("Telefono:",$this->user->getTelefono());
		
		$this->easyForm->addInput(1, "Dirección:","direccionInfo","direccionInfo","","yes","","","form");
		$this->easyForm->setItem("Dirección:",$this->user->getDireccion());
		
		$this->easyForm->addInput(1, "Ciudad:","ciudadInfo","ciudadInfo","","yes","","","form");
		$this->easyForm->setItem("Ciudad:",$this->user->getCiudad());
		
		$this->easyForm->addInput(1, "Pais:","paisInfo","paisInfo","","yes","","","form");
		$this->easyForm->setItem("Pais:",$this->user->getPais());
		 
		$this->easyForm->addInput(1, "Email:","emailInfo","emailInfo","","yes","","","form");	
		$this->easyForm->setItem("Email:",$this->user->getEmail());
		
		$this->easyForm->addButton(3,"Aceptar:","AceptarU","AceptarU","aceptarU","aceptar","aceptar usuario","button","","button","","Aceptar","","","0", array("onclick"=>"GETMethodSend('AceptarU','tableUsers','../../Events/Admin/EventsFrmUserInfo.php')"));			
		
		$this->div=new Div("revisarUserDiv", "revisarUserDiv", "forms",array(),"220","600","150","150","hidden");
		$this->div->setVisibility("visible");
		$this->div->setMobile("mobile");
	}
	function show(){
		$this->div->start();
			$this->easyForm->show(2,8);
		$this->div->end();
	}
}
?>